How a room's tiles become walls, how a tile picks its wall picture, and how to make the wall pictures.
The 3D view reads the room when it starts. Every tile the room treats as solid becomes a wall; every other tile is open floor. The edge of the room is a wall too, so nothing can leave the map. The map is the room's tile grid, one square for one tile, so a room 24 tiles wide and 24 tall is a map 24 by 24, and a tile is 8 pixels on a side in every position you give.
You paint solid tiles in the Room Editor exactly as for any game. You do not need a picture on the room at all for the walls to exist; the picture comes from the next step.
A wall's picture is picked by the number of the tile you painted it with, in the room's tile set. Tile number 0 gets the first wall picture, tile 1 the second, and so on. If the tile number is past the last wall picture, it wraps round to the start.
That makes it easy to build a level with several kinds of wall: paint stone with one tile and brick with another, and each tile's number picks its picture. A room that has no painted tile picture at all (only solid squares) uses the first wall picture for every wall.
Wall pictures are made as one picture in your Tilesets and named in view3d_start:
view3d_start(ts_walls);- Use any colors you like. All the walls are drawn together, and the build reduces them to about 120 shared colors, so walls that share a style look best. - Or draw the sheet as an 8-bit picture whose colors are laid out in the 256-color rule: the lit colors are numbers 1 to 127, and the darker copy of color i is color i + 128 (the upper half is the lower half darkened). Then every color you drew is kept exactly, and the darker shades are yours too. Color 0 is clear: a wall pixel with color 0 is drawn black.
irstpersonshading](doc:view3d_shading) can use the same dark shade for far walls too.
Paint it in the Paint tab as a new picture 256 by 256 pixels, or import one. Draw a wall that tiles sideways: the left edge should meet the right edge, so that two squares of wall side by side look like one long wall.
A wall tile can be turned into a sliding door by code, view3d_door. It keeps the wall picture you painted it with, so paint the door tile with the number of the door's picture (a door picture is just another wall picture on the sheet). See Enemies and items in 3D.
view3d_hit_wall tells you which picture a ray met, which is a quick way to see what number a tile in your room really gave.